package com.bocloud.cmp.entity;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;

/**
 * 审批
 * 
 * @author dongkai
 *
 */
@Table("approve_node")
public class ApproveNode extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("approver")
	private Long approver;// 审批人
	@Column("apply_id")
	private Long applyId;// 申请ID
	@Column("applicant")
	private Long applicant;// 申请人
	@Column("passed")
	private Boolean passed;// 是否通过
	@Column("reason")
	private String reason;// 原因
	@Column("priority")
	private Integer priority;// 优先级
	@IgnoreAll
	private String username;

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username
	 *            the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	public ApproveNode() {

	}

	public ApproveNode(Long approver, Long applyId, Long applicant, Boolean passed, String reason, Integer priority) {
		this.approver = approver;
		this.applyId = applyId;
		this.applicant = applicant;
		this.passed = passed;
		this.reason = reason;
		this.priority = priority;
	}

	/**
	 * @return the priority
	 */
	public Integer getPriority() {
		return priority;
	}

	/**
	 * @param priority
	 *            the priority to set
	 */
	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the approver
	 */
	public Long getApprover() {
		return approver;
	}

	/**
	 * @param approver
	 *            the approver to set
	 */
	public void setApprover(Long approver) {
		this.approver = approver;
	}

	/**
	 * @return the applyId
	 */
	public Long getApplyId() {
		return applyId;
	}

	/**
	 * @param applyId
	 *            the applyId to set
	 */
	public void setApplyId(Long applyId) {
		this.applyId = applyId;
	}

	/**
	 * @return the applicant
	 */
	public Long getApplicant() {
		return applicant;
	}

	/**
	 * @param applicant
	 *            the applicant to set
	 */
	public void setApplicant(Long applicant) {
		this.applicant = applicant;
	}

	/**
	 * @return the passed
	 */
	public Boolean getPassed() {
		return passed;
	}

	/**
	 * @param passed
	 *            the passed to set
	 */
	public void setPassed(Boolean passed) {
		this.passed = passed;
	}

	/**
	 * @return the reason
	 */
	public String getReason() {
		return reason;
	}

	/**
	 * @param reason
	 *            the reason to set
	 */
	public void setReason(String reason) {
		this.reason = reason;
	}

}
